package org.jeecg.modules.friends.config;
import org.jeecg.modules.friends.config.interceptor.LoginInfoInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author cold
 * @data 2024/6/4 16:33
 * @version 1.0
 */

//@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

    @Override   //拦截器配置
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new LoginInfoInterceptor()).addPathPatterns("/friends/**").excludePathPatterns("/friends/userLogin/**",
                "/friends/loginService/**","/friends/user/queryRecommendedUserInfo","/friends/user/queryRecommendedUserInfo/detailInfo","/friends" +
                        "/sys/**","/friends/youzan/**", "/friends/metaInfo/**", "/friends/pic/**","/friends/user/userDataWash");
    }
}